<?php

   unset($tplcontent);
   $tplcontent['main'].="<a href=\"admin_config.php\">Config/Options</a><br>";
   $tplcontent['main'].="<a href=\"admin_storage.php\">Storage</a>";

   $tplcontent['info'].="<a href=\"admin_status.php\">Status</a><br>";
   $tplcontent['info'].="<a href=\"admin_troubleshoot.php\">Troubleshooting</a><br>";
   $tplcontent['info'].="<a href=\"admin_news.php\">NavBoard News</a>";

   $tplcontent['forums'].="<a href=\"admin_forums.php\">Edit/Delete</a><br>";
   $tplcontent['forums'].="<a href=\"admin_forums.php?addforum=1\">Add</a><br>";
   $tplcontent['forums'].="<a href=\"admin_forums.php?editorder=1\">Order</a>";

   $tplcontent['users'].="<a href=\"admin_users.php\">Edit/Ban</a><br>";
   $tplcontent['users'].="<a href=\"admin_profilefields.php\">Profile Fields</a><br>";
   $tplcontent['users'].="<a href=\"admin_userlevels.php\">User Levels</a><br>";
   $tplcontent['users'].="<a href=\"admin_usergroups.php\">User groups</a><br>";
   $tplcontent['users'].="<a href=\"admin_banlist.php\">Ban list</a><br>";
   $tplcontent['users'].="<a href=\"admin_approve.php\">Approvals</a>";

   $tplcontent['themes'].="<a href=\"admin_themes.php\">Main</a><br>";
   $tplcontent['themes'].="<a href=\"admin_themes.php#templates\">Templates</a><br>";
   $tplcontent['themes'].="<a href=\"admin_themes.php#replacements\">Replacements</a><br>";

   $tplcontent['posts'].="<a href=\"admin_bbcode.php\">BBCode</a><br>";
   $tplcontent['posts'].="<a href=\"admin_smilies.php\">Smilies</a><br>";

   $tplcontent['files'].="<a href=\"admin_backup.php\">Backup</a><br>";
   $tplcontent['files'].="<a href=\"admin_clean.php\">Clean</a><br>";

   $modulesarray=listdirs("modules");
   for($n=0;$n<count($modulesarray);$n++){
    unset($moduleconfig);
    include("modules/$modulesarray[$n]/config.php"); 
     if($moduleconfig['adminpage']){
      $modulesadminarray[]=$modulesarray[$n];
     }
   }

   if(count($modulesadminarray)>0){
    for($n=0;$n<count($modulesadminarray);$n++){
     $tplcontent['modules'].="<a href=\"admin_modules.php?module=$modulesadminarray[$n]\">$modulesadminarray[$n]</a><br>";
    }
   }else{
   $tplcontent['modules'].="None";
   }
   
   echo template('adminheader',$tplcontent);

?>
